package com.meida.module.user.client.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.meida.common.mybatis.annotation.TableAlias;
import com.meida.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * APP用户-基础信息
 *
 * @author zyf
 */
@Data
@NoArgsConstructor
@TableName("app_user")
@TableAlias("user")
@ApiModel(value = "AppUser", description = "用户信息描述")
public class AppUser extends AbstractEntity {
    private static final long serialVersionUID = -735161640894047414L;

    @ApiModelProperty(hidden = true)
    @TableId(value = "userId", type = IdType.ID_WORKER)
    private Long userId;


    @ApiModelProperty("用户名")
    private String userName;


    @ApiModelProperty(hidden = true, value = "用户类型")
    private String userType;


    @ApiModelProperty(hidden = true, value = "公司")
    private Long companyId;


    @ApiModelProperty(value = "角色")
    private Long roleId;

    @ApiModelProperty(value = "部门")
    private Long deptId;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty("区")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long areaId;

    @ApiModelProperty("市")
    private Long cityId;

    @ApiModelProperty("省")
    private Long proId;


    @ApiModelProperty("区域名称")
    private String areaName;

    @ApiModelProperty("头像")
    private String avatar;


    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty(value = "性别")
    private Integer sex;

    @ApiModelProperty("手机号")
    private String mobile;


    @ApiModelProperty("生日")
    private String birthday;

    @ApiModelProperty("备注")
    private String remark;


    @ApiModelProperty("职位")
    private String position;


    @ApiModelProperty("职位")
    private Long positionId;

    @ApiModelProperty(hidden = true, name = "注册IP")
    private String registerIp;


    @ApiModelProperty(hidden = true, value = "注册时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerTime;


    @ApiModelProperty(hidden = true, value = "状态", notes = "0-禁用 1-启用 2-锁定")
    private Integer status;


    @ApiModelProperty("推荐人")
    private Long inviterId;


    @ApiModelProperty("邀请码")
    private String shareCode;

    @ApiModelProperty("个性签名")
    private String motto;

    @ApiModelProperty("用户即时通讯token")
    private String userToken;




}
